<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button onclick="fn()">1</button>
    <button onclick="fn2()">2</button>
    <button onclick="fn3()">3</button>
    <script>
        function fn() {
            console.log(this);//window
        }
        function fn2() {
            'use strict';
            console.log(this);//undefined
        }
        class Box{
            fn3(){
                console.log(this);//undefined
            }
        }
        const fn3=new Box().fn3;
    </script>
</body>

</html>